---
id: custom-actions
sidebar_label: Custom Actions
title: Custom Actions
abstract: A custom action can run any code you want, including API calls, database queries etc. They can turn on the lights, add an event to a calendar, check a user's bank balance, or anything else you can imagine.
---

For details on how to implement a custom action, see the [SDK documentation](https://rasa.com/docs/action-server/running-action-server).
Any custom action that you want to use in your stories should be added into the
actions section of your [domain](./domain.mdx).


When the dialogue engine predicts a custom action to be executed, it will call
the action server, with the following information:

```json
{
  "next_action": "string",
  "sender_id": "string",
  "tracker": {
    "conversation_id": "default",
    "slots": {},
    "latest_message": {},
    "latest_event_time": 1537645578.314389,
    "followup_action": "string",
    "paused": false,
    "events": [],
    "latest_input_channel": "rest",
    "active_loop": {},
    "latest_action": {},
  },
"domain": {
    "config": {},
    "session_config": {},
    "intents": [],
    "entities": [],
    "slots": {},
    "responses": {},
    "actions": [],
    "forms": {},
    "e2e_actions": []
  },
  "version": "version"
}
```

Your action server should respond with a list of events and responses:

```json
{
  "events": [{}],
  "responses": [{}]
}
```
